# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: André Klitzing <aklitzing@online.de>

pkgname=exempi
pkgver=2.4.5
pkgrel=1
pkgdesc="A library to parse XMP metadata"
url="https://libopenraw.freedesktop.org/wiki/Exempi"
arch=(x86_64)
license=(custom:BSD)
depends=(gcc-libs expat zlib)
makedepends=(boost git autoconf-archive)
_commit=c523a9515d62e15b77789213227ffb605325ee22  # tags/2.4.5^0
source=("git+https://anongit.freedesktop.org/git/exempi#commit=$_commit")
sha256sums=('SKIP')
validpgpkeys=('6C44DB3E0BF3EAF5B433239A5FEE05E6A56E15A3') # Hubert Figuiere

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --disable-static
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
